<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="${base}/statics/lib/html5.js"></script>
<script type="text/javascript" src="${base}/statics/lib/respond.min.js"></script>
<script type="text/javascript" src="${base}/statics/lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="${base}/statics/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="${base}/statics/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="${base}/statics/lib/icheck/icheck.css" />
<link rel="stylesheet" type="text/css" href="${base}/statics/lib/Hui-iconfont/1.0.7/iconfont.css" />
<style>
	.form-label{float:left;}
	.formControls{float:left;}
	.col-4{float:left;}
	div.spot {
        float: left;
        margin: 0 20px 0 0;
        width: 80px;
        min-height: 80px;
        border: 2px dashed #ddd;
    }
    .droparea {
        position: relative;
        text-align: center;
    }
    .droparea .instructions {
        opacity: 0.8;
        background-color: #cccccc;
        height: 25px;
        z-index: 10;
        zoom: 1;
        background-position: initial initial;
        background-repeat: initial initial;
        cursor: pointer;
    }
    .droparea div, .droparea input {
        position: absolute;
        top: 0;
        width: 100%;
        height: 100%;
    }
    .droparea input {
        cursor: pointer;
        opacity: 0;
    }
    .droparea div, .droparea input {
        position: absolute;
        top: 0;
        width: 100%;
        height: 100%;
    }
    #uparea1,#uparea2,#uparea3{
        height: 80px;
        cursor: pointer;
    }
</style>
</head>
<body>
<div class="pd-20">
	<form action="" method="post" class="form form-horizontal" id="form-article-add">
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>商品名称：</label>
			<div class="formControls col-4">
				<input type="text" class="input-text" value="" placeholder="" id="" name="">
			</div>
			<label class="form-label col-2">商品简称：</label>
			<div class="formControls col-4">
				<input type="text" class="input-text" value="" placeholder="" id="" name="">
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>分类栏目：</label>
			<div class="formControls col-2"> <span class="select-box">
				<select name="" class="select">
			          <#list categorylist as vo>
			          	<#if vo.category_pid??&& vo.category_pid == 0>
							<option value="${vo.category_id}">${vo.category_name}</option>
							<#list categorylist as vo1>
								<#if vo1.category_pid??&& vo1.category_pid == vo.category_id>
								   <option value="${vo1.category_id}">&nbsp;&nbsp;├${vo1.category_name}</option>
								   <#list categorylist as vo2>
										<#if vo2.category_pid??&& vo2.category_pid == vo1.category_id>
										   <option value="${vo2.category_id}">&nbsp;&nbsp;&nbsp;&nbsp;├${vo2.category_name}</option>
										</#if>
									</#list>
								</#if>
							</#list>
						</#if>
					  </#list>
				</select>
				</span> </div>
			<label class="form-label col-2">品牌：</label>
			<div class="formControls col-2">
				<span class="select-box">
				<select name="" class="select">
					  <option value="">无品牌</option>
			          <#list brandlist as vo>
			          	<option value="${vo.brand_id}">${vo.brand_name}</option>
					  </#list>
				</select>
				</span>
			</div>
			<label class="form-label col-2">产品规格：</label>
			<div class="formControls col-2">
				<span class="select-box">
				<select name="" class="select">
					  <option value="">无规格</option>
			          <#list rulelist as vo>
			          	<option value="${vo.rule_id}">${vo.rule_name}</option>
					  </#list>
				</select>
				</span>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">活动价：</label>
			<div class="formControls col-2">
				<input type="text" name="" id="" placeholder="单位元" value="" class="input-text">
			</div>
			<label class="form-label col-2">商品商城价：</label>
			<div class="formControls col-2">
				<input type="text" name="" id="" placeholder="单位元" value="" class="input-text">
			</div>
			<label class="form-label col-2">商品市场价：</label>
			<div class="formControls col-2">
				<input type="text" name="" id="" placeholder="单位元" value="" class="input-text">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">产地：</label>
			<div class="formControls col-10">
				<input type="text" name="" id="" placeholder="" value="" class="input-text">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">价格计算单位：</label>
			<div class="formControls col-4"> <span class="select-box">
				<select class="select">
					<option>请选择</option>
					<option value="1">件</option>
					<option value="2">斤</option>
					<option value="3">KG</option>
					<option value="4">吨</option>
					<option value="5">套</option>
				</select>
				</span> </div>
			<label class="form-label col-2">产品重量：</label>
			<div class="formControls col-4">
				<input type="text" name="" id="" placeholder="" value="" class="input-text" style="width:90%">
				kg</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">产品展示价格：</label>
			<div class="formControls col-4">
				<input type="text" name="" id="" placeholder="" value="" class="input-text" style="width:90%">
				元</div>
			<label class="form-label col-2">市场价格：</label>
			<div class="formControls col-4">
				<input type="text" name="" id="" placeholder="" value="" class="input-text" style="width:90%">
				元</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">成本价格：</label>
			<div class="formControls col-4">
				<input type="text" name="" id="" placeholder="" value="" class="input-text" style="width:90%">
				元</div>
			<label class="form-label col-2">最低销售价格：</label>
			<div class="formControls col-4">
				<input type="text" name="" id="" placeholder="" value="" class="input-text" style="width:90%">
				元</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">销售开始时间：</label>
			<div class="formControls col-4">
				<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width:180px;">
			</div>
			<label class="form-label col-2">销售结束时间：</label>
			<div class="formControls col-4">
				<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'datemin\')}'})" id="datemax" class="input-text Wdate" style="width:180px;">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">产品关键字：</label>
			<div class="formControls col-10">
				<input type="text" name="" id="" placeholder="多个关键字用英文逗号隔开，限10个关键字" value="" class="input-text">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">产品摘要：</label>
			<div class="formControls col-10">
				<textarea name="" cols="" rows="" class="textarea"  placeholder="说点什么...最少输入10个字符" datatype="*10-100" dragonfly="true" nullmsg="备注不能为空！" onKeyUp="textarealength(this,200)"></textarea>
				<p class="textarea-numberbar"><em class="textarea-length">0</em>/200</p>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">缩略图：</label>
			<div class="formControls col-10">
				<div class="uploader-thum-container">
					<div id="fileList" class="uploader-list"></div>
					<div id="filePicker">选择图片</div>
					<button id="btn-star" class="btn btn-default btn-uploadstar radius ml-10">开始上传</button>
				</div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">图片上传：</label>
			<div class="formControls col-10">
				<div class="uploader-list-container">
					<div class="queueList">
						<div id="dndArea" class="placeholder">
							<div id="filePicker-2"></div>
							<p>或将照片拖到这里，单次最多可选300张</p>
						</div>
					</div>
					<div class="statusBar" style="display:none;">
						<div class="progress"> <span class="text">0%</span> <span class="percentage"></span> </div>
						<div class="info"></div>
						<div class="btns">
							<div id="filePicker2"></div>
							<div class="uploadBtn">开始上传</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">详细内容：</label>
			<div class="formControls col-10"> 
				 <textarea id="content" style="height:500px; width: 100%;" name="brand_text"></textarea>
			</div>
		</div>
		<div class="row cl">
			<div class="col-10 col-offset-2">
				<button onClick="article_save_submit();" class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存并提交审核</button>
				<button onClick="article_save();" class="btn btn-secondary radius" type="button"><i class="Hui-iconfont">&#xe632;</i> 保存草稿</button>
				<button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
			</div>
		</div>
	</form>
</div>
</div>
<script type="text/javascript" src="${base}/statics/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="${base}/statics/lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="${base}/statics/lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="${base}/statics/lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="${base}/statics/h-ui/js/H-ui.js"></script> 
<script type="text/javascript" src="${base}/statics/h-ui.admin/js/H-ui.admin.js"></script>
<script charset="utf-8" src="${base}/statics/kingeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="${base}/statics/kingeditor/zh_CN.js"></script>
<script type="text/javascript" src="${base}/statics/easyui/common.js"></script>
<script type="text/javascript">
function del_image(num){
    $('#image'+num).css('background-image','');
    $('#image_'+num).val('');
}
$(function(){
	 var  content ;
     KindEditor.ready(function(K) {
    	 content = K.create('#content',{
             allowFileManager : true,
             uploadJson:'${base}/statics/kingeditor/jsp/upload_json.jsp'
         });
     });
	KindEditor.ready(function(K) {
		 K.create();
         var editor = K.editor({
             allowFileManager : true,
             uploadJson:'${base}/statics/kingeditor/jsp/upload_json.jsp',
             fileManagerJson:'${base}/statics/kingeditor/jsp/file_manager_json.jsp'
         });
         K('#uparea1').click(function() {
             editor.loadPlugin('image', function() {
                 editor.plugin.imageDialog({
                     imageUrl : K('#image_1').val(),
                     clickFn : function(url, title, width, height, border, align) {
                         $('#image1').css('background-image','url('+url+')').css('background-size','80px 80px');
                         K('#image_1').val(url);
                         editor.hideDialog();
                     }
                 });
             });
         });
	});
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-edit").Validform({
		tiptype:4,
		ajaxPost:true,
		beforeSubmit:function(){
			content.sync();
		},
		callback:function(data){
			layer.msg(data.msg);
			if(data.status==1){
				setTimeout(function(){
					var index = parent.layer.getFrameIndex(window.name);
					parent.datagrid();
					parent.layer.close(index);
				},1000);
				
			}
			
		}
	});
});

</script>
</body>
</html>